import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/v1/group/list',
    method: 'get',
    params: query
  })
}
export function getPagesList(query) {
  return request({
    url: '/api/v1/group/page',
    method: 'get',
    params: query
  })
}
export function addOrEditGroup(data) {
  return request({
    url: '/api/v1/group/',
    method: 'post',
    data: data
  })
}
export function updateGroup(data) {
  return request({
    url: '/api/v1/group/',
    method: 'put',
    data: data
  })
}
export function delGroup(params) {
  return request({
    url: '/api/v1/group/' + params.id,
    method: 'delete'
  })
}

